home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- go(the frame)
- end
-
- on idle
- global gNbEtapesSequence, gNumEtapeSequence, gListeTempoEtape, gNumPisteNav, gTypeTempoEtape, gValeurTempoEtape, gLastRollSouris, gEntreeEtapeNavigation, gNumEtapeMax, gTimerDebutSon, gFlagTransition, gFlagSon, g_call_param, gClickVisite, gRefSequence, gTypeAccesSequence, gListeReperes, gCurseurPointerSeq, gCurseurLoupeInSeq, gCurseurDoigtSeq, gCurseurFlecheGaucheSeq, gCurseurFlecheDroiteSeq, gCurseurMainUpSeq, gNumSpriteVideo, gTypeSpriteVideo, gNumTexteSprite, gListeTimer, gPhraseCourante, gIndex, gTailleListe, gListeDescSpriteVideo, gFinAfficherEtape
- if gTypeTempoEtape = "NoDelay" then
- put "Tempo 'noDelay'..." && "(Timer:" && the timer & ")"
- afficherEtapeSuivante()
- exit
- else
- if gTypeTempoEtape = "Delai" then
- if (the timer >= gValeurTempoEtape) and (gNumEtapeSequence < gNbEtapesSequence) then
- put "Tempo 'Delai'" && gValeurTempoEtape && "(Timer:" && the timer & ")"
- afficherEtapeSuivante()
- exit
- end if
- else
- if gTypeTempoEtape = "SynchroSon" then
- if the ticks >= (gTimerDebutSon + gValeurTempoEtape) then
- put "Tempo 'SynchroSon'..." && gValeurTempoEtape && "(Timer:" && the ticks - gTimerDebutSon & ")"
- afficherEtapeSuivante()
- exit
- end if
- else
- if gTypeTempoEtape = "FinSon" then
- put "Tempo 'FinSon'..."
- repeat while soundBusy(1)
- if the mouseDown then
- exit repeat
- end if
- end repeat
- afficherEtapeSuivante()
- exit
- else
- if gTypeTempoEtape = "Navigation" then
- if gEntreeEtapeNavigation = 1 then
- positionnerFlechesNav()
- put "Tempo 'Navigation'..." && "(Fleches:" && gValeurTempoEtape & ")"
- if gNumSpriteVideo > 0 then
- puppetSprite(gNumSpriteVideo, 1)
- if gFinAfficherEtape = 0 then
- put "FALSE"
- else
- put "TRUE"
- end if
- set numsprite to getAt(gListeDescSpriteVideo, 1)
- set the member of sprite numsprite to member getAt(gListeDescSpriteVideo, 2)
- set the rect of sprite numsprite to getAt(gListeDescSpriteVideo, 3)
- updateStage()
- if gTypeSpriteVideo = "QT" then
- set the movieRate of sprite gNumSpriteVideo to 1
- else
- if gTypeAccesSequence = "Visite" then
- repeat with i = 1 to 545
- set the movieTime of sprite gNumSpriteVideo to i mod the duration of member the name of the member of sprite gNumSpriteVideo
- if the mouseDown then
- exit
- end if
- updateStage()
- end repeat
- updateStage()
- set gNumEtapeSequence to gNumEtapeSequence + 1
- set gFlagTransition to 1
- set gFlagSon to 1
- afficherEtape(gNumEtapeSequence)
- else
- repeat with i = 1 to 50
- set the movieTime of sprite gNumSpriteVideo to i
- updateStage()
- end repeat
- repeat with i = 50 down to 0
- set the movieTime of sprite gNumSpriteVideo to i
- updateStage()
- end repeat
- end if
- end if
- end if
- end if
- if (gNumSpriteVideo > 0) and (gRefSequence = "C00") then
- if (the movieTime of sprite gNumSpriteVideo > 1740) and (the memberNum of sprite 5 <> the number of member "C00BZ0" of castLib "Sequence") then
- puppetSprite(4, 1)
- puppetSprite(5, 1)
- set the member of sprite 4 to member "C00BZ0"
- set the loc of sprite 4 to point(46, 8)
- set the member of sprite 5 to member "C00BK9"
- set the loc of sprite 5 to point(434, 141)
- end if
- else
- if (gNumSpriteVideo > 0) and (gRefSequence = "N40") then
- set gNumTexteSprite to 48
- puppetSprite(48, 1)
- set the ink of sprite gNumTexteSprite to 36
- set gIndex to getAt(gListeTimer, gPhraseCourante)
- set gTailleListe to count(gListeTimer)
- if the movieTime of sprite gNumSpriteVideo >= gIndex then
- set nomMembre to "All" & gPhraseCourante
- set the castNum of sprite gNumTexteSprite to the number of member nomMembre
- put nomMembre
- set Largeur to the width of member nomMembre
- set the locH of sprite gNumTexteSprite to (640 - Largeur) / 2
- set the locV of sprite gNumTexteSprite to 340
- updateStage()
- if (gPhraseCourante + 1) <= gTailleListe then
- set gPhraseCourante to gPhraseCourante + 1
- set gIndex to getAt(gListeTimer, gPhraseCourante)
- put "gIndex :" & gIndex
- end if
- end if
- end if
- end if
- if gTypeAccesSequence = "Visite" then
- put RETURN & "VISITE...." & RETURN
- startTimer()
- repeat while the timer < 180
- if the mouseDown then
- set gClickVisite to 1
- OwnPlayDone()
- exit
- end if
- end repeat
- if soundBusy(1) and (chars(gSonEnCours, 1, 3) = gRefSequence) then
- repeat while soundBusy(1)
- if the mouseDown then
- set gClickVisite to 1
- OwnPlayDone()
- exit
- end if
- end repeat
- end if
- if gNumEtapeSequence = gNbEtapesSequence then
- OwnPlayDone()
- exit
- else
- afficherEtapeSuivante()
- end if
- end if
- set rollSouris to GetRollSouris()
- puppetSprite(gNumPisteNav + 1, 1)
- if not voidp(rollSouris) then
- set curseur to "curseurPointer"
- if rollSouris <> gLastRollSouris then
- set the member of sprite (gNumPisteNav + 1) to member ("Nav" && gValeurTempoEtape && rollSouris)
- if rollSouris = "gauche" then
- set the loc of sprite (gNumPisteNav + 1) to point(573, 464)
- else
- if rollSouris = "retour" then
- set the loc of sprite (gNumPisteNav + 1) to point(598, 464)
- else
- if rollSouris = "droite" then
- set the loc of sprite (gNumPisteNav + 1) to point(624, 464)
- end if
- end if
- end if
- set the type of sprite (gNumPisteNav + 1) to 16
- set gLastRollSouris to rollSouris
- end if
- else
- if gLastRollSouris <> EMPTY then
- if gTypeAccesSequence <> "Index" then
- cursor(-1)
- end if
- set the type of sprite (gNumPisteNav + 1) to 0
- set gLastRollSouris to EMPTY
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- if curseur = "curseurPointer" then
- cursor(gCurseurPointerSeq)
- else
- if gTypeAccesSequence = "Index" then
- cursor(gCurseurLoupeInSeq)
- else
- if (gTypeSpriteVideo = "QTVR") and rollOver(gNumSpriteVideo) then
- cursor(gCurseurMainUpSeq)
- else
- cursor(-1)
- end if
- end if
- end if
- end
-
- on mouseDown
- global gLastRollSouris, gClickNav, gTypeAccesSequence, gNumEtapeSequence, gNumEtapeMax, gFlagTransition, gFlagSon, gNumSpriteVideo, gTypeSpriteVideo, gCurseurMainDown, gtypempoetape
- if rollOver(gNumSpriteVideo) and (gTypeSpriteVideo = "QTVR") then
- cursor(gCurseurMainDownSeq)
- gestionQTVRMarc()
- else
- set gClickNav to gLastRollSouris
- if (gLastRollSouris = EMPTY) and (gTypeAccesSequence = "Index") then
- set gNumEtapeSequence to 1
- set gNumEtapeMax to 1
- set gFlagTransition to 1
- set gFlagSon to 1
- set gTypeAccesSequence to EMPTY
- afficherEtape(gNumEtapeSequence)
- put "GTYPETEMPOETAPEDOWN :" && gtypempoetape
- end if
- end if
- end
-
- on mouseUp
- global gLastRollSouris, gClickNav, gNumEtapeSequence, gNumPisteNav, gNbEtapesSequence, g_call_param, gFlagTransition, gFlagSon, gListePausesNavigation, gListeReperes, gNumEtapeMax, gTypeAccesSequence, gClickVisite
- if gTypeAccesSequence = "Visite" then
- put "Ici...."
- set gClickVisite to 1
- OwnPlayDone()
- end if
- if (gLastRollSouris = gClickNav) and (gLastRollSouris <> EMPTY) then
- set gLastRollSouris to EMPTY
- cursor(4)
- if gClickNav = "retour" then
- OwnPlayDone()
- else
- if gClickNav = "droite" then
- if gNumEtapeSequence = gNbEtapesSequence then
- OwnPlayDone()
- else
- if gNumEtapeSequence < gNumEtapeMax then
- arreterVoixOff()
- set posListeRepere to getPos(gListeReperes, gNumEtapeSequence)
- set gNumEtapeSequence to getAt(gListeReperes, posListeRepere + 1)
- set gFlagTransition to 0
- set gFlagSon to 0
- else
- set gNumEtapeSequence to gNumEtapeSequence + 1
- set gFlagTransition to 1
- set gFlagSon to 1
- end if
- afficherEtape(gNumEtapeSequence)
- end if
- else
- if gClickNav = "gauche" then
- afficherEtapePrecedente()
- end if
- end if
- end if
- end if
- end
-
- on keyUp
- global gDebug, gFrappeSequence, gListeSequences, gPathBoot, gPathDelimitor, gNumEtapeSequence, gRefSequence, g_call_param
- set gFrappeSequence to chars(gFrappeSequence, 2, 6) & the key
- if gDebug = 1 then
- set refSequence to chars(gFrappeSequence, 4, 6)
- set valueCharUnivers to charToNum(char 1 of refSequence)
- if valueCharUnivers < 97 then
- set refSequence to numToChar(valueCharUnivers + 32) & chars(refSequence, 2, 3)
- end if
- if getOne(gListeSequences, refSequence) then
- puppetSound(0)
- repeat with i = 1 to 48
- puppetSprite(i, 0)
- end repeat
- go(1)
- set the fileName of castLib "Sequence" to the pathName & char 1 of refSequence & gPathDelimitor & "Seq_" & refSequence
- set gRefSequence to refSequence
- repeat with i = 1 to 48
- puppetSprite(i, 0)
- end repeat
- initSCore()
- startMovieCheat()
- end if
- else
- if ((gFrappeSequence = "franck") or (gFrappeSequence = "sebast")) and (gDebug = 0) then
- alert("Cheat mode")
- set gDebug to 1
- else
- if gFrappeSequence = "neneck" then
- set g_call_param to "N00"
- go(1, gPathBoot & "Analyse")
- end if
- end if
- end if
- end
-